****APPENDIX FIGURE E1****

cd "$main_dir/output/figures/appendix_e"

graph set window fontface "Palatino"

//--------------------------------------------------------
//Create Figure E1
//--------------------------------------------------------

clear
use "$data_dir/raw/income_life_experience.dta"

collapse real_income, by(year)

line real_income year, graphregion(color(white)) xtitle("Year", margin(medsmall)) ytitle("Imputed Real" "Income (2011 Swiss Francs)", margin(medsmall)) xline(1999, lcolor(black) lpattern(shortdash))

graph export "figure_e1_a.png", replace

clear
use "$data_dir/clean/shp_final_clean.dta"

rename real_income real_income_shp
rename survey_year year

collapse real_income, by(isco88_2digit year)
merge 1:1 isco88_2digit year using "$data_dir/raw/swiss_wages_oww.dta"

rename income real_income_oww

binsreg real_income_shp real_income_oww, absorb(year) polyreg(1) graphregion(color(white)) xtitle("Imputed Real Income (OWW)", margin(medsmall)) ytitle("Real Income (SHP)", margin(medsmall))
corr real_income_shp real_income_oww
graph export "figure_e1_b.png", replace
